home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / commonModellingProperties.me < prev    next >
Encoding:
Text File  |  2003-07-17  |  5.4 KB  |  188 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  May 14 1996
  22. //  Author:         mgr
  23. //
  24. //  Description:
  25. //        These procs create the controls for a common modelling property sheet.
  26. //        See also commonModellingValues.mel for procs that set the state of the 
  27. //        property sheet.
  28. //
  29. //  Input Arguments:
  30. //      None.
  31. //
  32. //  Return Value:
  33. //      None.
  34. //
  35.  
  36. proc commonModellingSetCallbacks( string $parent, string $ctxCmdName ) {
  37. //
  38. //  Description:
  39. //      Set the callbacks for all of the controls in the dialog.
  40. //      Modifying the context will force commonModellingValues() to
  41. //      be called to update the state of the property sheet.
  42. //
  43. //
  44.     setParent $parent;
  45. }
  46.  
  47. global proc optionalCommonModellingSetCallbacks(string $parent, string $ctxCmdName, 
  48.                         string $showOutputStyle, 
  49.                         string $showKeepOriginals,
  50.                         string $showCurveRange,
  51.                         string $showRebuild) 
  52. {
  53. //
  54. //  Description:
  55. //      Set the callbacks for all of the controls in the dialog.
  56. //      Modifying the context will force commonModellingValues() to
  57. //      be called to update the state of the property sheet.
  58. //
  59. //
  60.     setParent $parent;
  61.  
  62.     if ($showOutputStyle == "showOutputStyle")
  63.     {
  64.         frameLayout -edit -collapse false showOutputFrameLayout;
  65.         radioButtonGrp -e 
  66.             -cc1 ($ctxCmdName + " -e -po false `currentCtx`")
  67.             -cc2 ($ctxCmdName + " -e -po true `currentCtx`")
  68.             commonModellingOutputOptions;
  69.     } else
  70.     {
  71.         frameLayout -edit -collapse true showOutputFrameLayout;
  72.     }
  73.  
  74.     if ($showKeepOriginals == "showKeepOriginals")
  75.     {
  76.         frameLayout -edit -collapse false keepOriginalFrameLayout;
  77.  
  78.         checkBoxGrp -e -cc1 ($ctxCmdName + " -e -rpo (! #1) `currentCtx`")
  79.             commonModellingReplaceOptions;
  80.     } else
  81.     {
  82.         frameLayout -edit -collapse true keepOriginalFrameLayout;
  83.     }
  84.  
  85.     if ($showCurveRange == "showCurveRange")
  86.     {
  87.         frameLayout -edit -collapse false curveRangeFrameLayout;
  88.  
  89.         // Needs editing to match curve range attribute name
  90.         radioButtonGrp -e 
  91.             -cc1 ($ctxCmdName + " -e -rn false `currentCtx`")
  92.             -cc2 ($ctxCmdName + " -e -rn true `currentCtx`")
  93.             commonModellingCurveRangeOptions;
  94.     } else
  95.     {
  96.         frameLayout -edit -collapse true curveRangeFrameLayout;
  97.     }
  98.  
  99.     if ($showRebuild == "showRebuild")
  100.     {
  101.         frameLayout -edit -collapse false rebuildStyleFrameLayout;
  102.  
  103.         // Needs editing to match rebuild attribute name
  104.         checkBoxGrp -e 
  105.             -cc ($ctxCmdName + " -e -rb #1 `currentCtx`")
  106.             commonModellingRebuildOption;
  107.     } else
  108.     {
  109.         frameLayout -edit -collapse true rebuildStyleFrameLayout;
  110.     }
  111. }
  112.  
  113. global proc commonModellingProperties( string $parent, string $ctxCmdName )
  114. //
  115. //  Description:
  116. //        This procedure builds the property sheet and assigns callbacks to its
  117. //        controls. The state of the controls are set in commonModellingValues().
  118. //
  119. //  Description:
  120. //        The common controls will look like:
  121. //
  122. //                [] History
  123. //                [] Auto Create
  124. //
  125. {
  126.     setUITemplate -pushTemplate OptionsTemplate;
  127.     setParent $parent;
  128.  
  129.     //
  130.     // Common modelling options
  131.     //
  132.         frameLayout -collapsable true -collapse false
  133.             -label "Standard Options" commonModellingFrame;
  134.             columnLayout commonModellingLayout;
  135.  
  136.             frameLayout -labelVisible false -borderVisible false
  137.                 -collapsable true -collapse true
  138.                 keepOriginalFrameLayout;
  139.             columnLayout;
  140.             checkBoxGrp -numberOfCheckBoxes 1 -label ""
  141.                 -label1 "Keep Original"
  142.                 -value1 false 
  143.                 commonModellingReplaceOptions;
  144.             setParent ..;
  145.             setParent ..;
  146.  
  147.             frameLayout -labelVisible false -borderVisible false
  148.                 -collapsable true -collapse true
  149.                 curveRangeFrameLayout;
  150.             columnLayout;
  151.             radioButtonGrp -numberOfRadioButtons 2 -label "Curve Range"
  152.                 -label1 "Complete"
  153.                 -label2 "Partial" 
  154.                 -select 1
  155.                 commonModellingCurveRangeOptions;
  156.             setParent ..;
  157.             setParent ..;
  158.  
  159.             frameLayout -labelVisible false -borderVisible false
  160.                 -collapsable true -collapse true
  161.                 rebuildStyleFrameLayout;
  162.             columnLayout;
  163.             checkBoxGrp -numberOfCheckBoxes 1 -label ""
  164.                 -label1 "Rebuild"
  165.                 -value1 false 
  166.                 commonModellingRebuildOption;
  167.             setParent ..;
  168.             setParent ..;
  169.  
  170.             frameLayout -labelVisible false -borderVisible false
  171.                 -collapsable true -collapse true
  172.                 showOutputFrameLayout;
  173.             columnLayout;
  174.             radioButtonGrp -numberOfRadioButtons 2 -label "Output Geometry"
  175.                 -label1 "Nurbs"
  176.                 -label2 "Polygons" 
  177.                 -select 1
  178.                 commonModellingOutputOptions;
  179.             setParent ..;
  180.             setParent ..;
  181.  
  182.         setParent ..;
  183.     setParent ..;
  184.  
  185.     commonModellingSetCallbacks( $parent, $ctxCmdName );
  186.     setUITemplate -popTemplate;
  187. }
  188.